package nkr1pt.popkorn.download;

import com.google.inject.Inject;
import com.google.inject.Provider;
import nkr1pt.popkorn.download.Downloader;
import nkr1pt.popkorn.events.EventBus;
import nkr1pt.popkorn.events.PopkornEventFactory;

/**
 *
 * @author Kristof Vanhaeren
 */
public class DownloaderProvider implements Provider<Downloader> {

    private EventBus eventBus;
    private PopkornEventFactory eventFactory;
    
    @Inject
    public DownloaderProvider(EventBus eventBus, PopkornEventFactory eventFactory) {
        this.eventBus = eventBus;
        this.eventFactory = eventFactory;
    }

    public Downloader get() {
        return new Downloader(eventBus, eventFactory);
    }

}